﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _7._22
{
    class Program
    {
        //public int m;
        //public int n;
        //static int Enternumb1()
        //{
        //    Console.Write("Введите число n = ");
        //    int m = int.Parse(Console.ReadLine());
        //    return m;
        //}
        static int Enternumb2()
        {
            Console.Write("Введите число m = ");
            int n = int.Parse(Console.ReadLine());
            return n;
        }
        static void Expens(int[] arr, int n)
        {
            int first = 0;

            for (int j = 0; j < n; j++)
            {
                first = arr[0];

                for (int i = 0; i < arr.Length - 1; i++)
                {

                    arr[i] = arr[i + 1];

                }
                arr[arr.Length - 1] = first;

            }
        }
        static void Output(int[] arr)
        {
            for (int i = 0; i < arr.Length; i++)
                Console.Write(arr[i] + " ");
        }
        static void Main(string[] args)
        {
            int n = Enternumb2();
            //int m = Enternumb2();
            int[] arr = new int[] { 1, 2, 3, 4, 5, 6 };
            Expens(arr,n);
            Output(arr);
        }
    }
}